package library.book;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28214
 * Date: 2024-05-16
 * Time: 21:56
 */
public class BookList {
    private int usedSize;
    private Book[] books;

    public int getUsedSize() {
        return usedSize;
    }
    public void setBooks(Book[] books) {
        this.books = books;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
    public Book getBooks(int pos) {
        return books[pos];
    }

    public void setBooks(Book book,int pos) {
      books[pos]=book;
    }

    public BookList() {
        this.books = new Book[20];
        this.books[0]=new Book("三国演义","罗贯中",20,"小说");
        this.books[1]=new Book("红楼梦","曹雪芹",30,"小说");
        this.books[2]=new Book("西游记","吴承恩",40,"小说");
        this.books[3]=new Book("云边有个小卖部","大冰",50,"散文");
        this.usedSize=4;
    }
}
